#ifndef FEATURESTRACKER_H
#define FEATURESTRACKER_H

#include <iostream>
#include <iomanip>
#include <stdio.h>

#include <QDebug>
#include <QString>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/gpu/gpu.hpp>
#include <opencv2/contrib/contrib.hpp>¬

using namespace cv;

class featuresTracker
{
public:
    featuresTracker();
    void setUseGpu(bool value);
    cv::Rect detectFace(cv::Mat frame);
    cv::Rect detectLeftEye(cv::Mat frame);
    cv::Rect detectRigthEye(cv::Mat frame);
    cv::Rect detectMouth(cv::Mat frame);
    cv::Rect detectNose(cv::Mat frame);



    Rect getRightEyeRoiFromFaceArea(cv::Rect faceROI);
    Rect getLeftEyeRoiFromFaceArea(cv::Rect faceROI);
    Rect getNoseRoiFromFaceArea(cv::Rect faceROI);
    Rect getMouthRoiFromFaceArea(cv::Rect faceROI);


private:
    bool useGPU;

    cv::Rect detectAndDisplayCPU(cv::Mat frame, cv::String cascadeClassifierName, int minWindowSizeW, int minWindowSizeH , Scalar color);
    cv::Rect detectAndDisplayGPU(cv::Mat frame, cv::String cascadeClassifierName,float scale, int minWindowSizeW, int minWindowSizeH );

    void putEyeControlPoints(cv::Mat frame, cv::Rect eyeROI);
};

#endif // FEATURESTRACKER_H
